<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
      
    <!-- 求两个数中 较大的值 并打印输出在控制台 -->
    <script>
        var num1=10;
        var num2=20;
        if(num1>num2){
            console.log(num1);
        }else{
            console.log(num2);
        }
    // 三元运算
        num1>num2 ? console.log(num1) : console.log(num2);
    </script>
 <!-- --------------------------------------------------------- -->
</body>
</html>